<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:US.DateSelectorControl">
    <Style TargetType="local:DateSelector">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DateSelector">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <StackPanel x:Name="PART_SPMainContainer" Orientation="Horizontal">
                            <StackPanel.Resources>
                                <Style TargetType="ComboBox">
                                    <Setter Property="Margin" Value="5" />
                                </Style>
                            </StackPanel.Resources>
                            <ComboBox x:Name="PART_CMBMonth" Width="65"  Height="20" ItemsSource="{Binding MonthList,RelativeSource={RelativeSource TemplatedParent}}" SelectedItem="{Binding MonthString,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                            <ComboBox x:Name="PART_CMBDay" Width="65" Height="20" ItemsSource="{Binding DayList,RelativeSource={RelativeSource TemplatedParent}}" SelectedItem="{Binding DateValue.Day,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                            <ComboBox x:Name="PART_CMBYear" Width="65" Height="20" ItemsSource="{Binding YearList,RelativeSource={RelativeSource TemplatedParent}}" SelectedItem="{Binding DateValue.Year,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"/>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>